x = 30
dx = 5
y = 20
dy = 5
x = x - dx
y = y - dy
print(x,y)

x = 30
dx = 5
y = 20
dy = 5
import numpy as np

w = np.array([x,y]).reshape(2,1)
grad = np.array([dx,dy]).reshape(2,1)
w = w - grad
print(w)